package com.icss.dao;

import com.icss.entity.Dept;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class DeptFileDao implements IDeptFileDao {
    public static final File FILE_DEPT_PATH =new File("src\\com\\icss\\view\\deptFile");


    public void write(Dept dept) {
        try {
            FileWriter fileWriter = new FileWriter(FILE_DEPT_PATH,true);
            fileWriter.write(dept.getDeptNo()+","+dept.getDeptNo());
            fileWriter.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }}

